package com.erp.stock.controller;


import com.erp.common.ResponseMessage;
import com.erp.stock.entity.User;
import com.erp.stock.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Controller
@RequestMapping("/stock")
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping("/user/list")
    @ResponseBody
    public List<User> getAll(){
        return userService.findAll();
    }
}
